package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_intention database table.
 * 
 */
@Entity
@Table(name="per_intention")
@NamedQuery(name="PerIntention.findAll", query="SELECT p FROM PerIntention p")
public class PerIntention implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PER_INTENTION_IONID_GENERATOR", sequenceName="SEQ1",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PER_INTENTION_IONID_GENERATOR")
	private int ionid;

	private String ionrem;

	private int ionstat;

	//bi-directional many-to-one association to PerEmaFeb
	@OneToMany(mappedBy="perIntention")
	private List<PerEmaFeb> perEmaFebs;

	//bi-directional many-to-one association to PerPmsDept
	@ManyToOne
	@JoinColumn(name="DEPTID")
	private PerPmsDept perPmsDept;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp;

	//bi-directional many-to-one association to PerPmsPot
	@ManyToOne
	@JoinColumn(name="POTID")
	private PerPmsPot perPmsPot;

	//bi-directional many-to-one association to PerRetDem
	@ManyToOne
	@JoinColumn(name="DEMID")
	private PerRetDem perRetDem;

	//bi-directional many-to-one association to PerRetRse
	@ManyToOne
	@JoinColumn(name="RSEID")
	private PerRetRse perRetRse;

	//bi-directional many-to-one association to PerTngXes
	@ManyToOne
	@JoinColumn(name="XESID")
	private PerTngXes perTngXe;

	public PerIntention() {
	}

	public int getIonid() {
		return this.ionid;
	}

	public void setIonid(int ionid) {
		this.ionid = ionid;
	}

	public String getIonrem() {
		return this.ionrem;
	}

	public void setIonrem(String ionrem) {
		this.ionrem = ionrem;
	}

	public int getIonstat() {
		return this.ionstat;
	}

	public void setIonstat(int ionstat) {
		this.ionstat = ionstat;
	}

	public List<PerEmaFeb> getPerEmaFebs() {
		return this.perEmaFebs;
	}

	public void setPerEmaFebs(List<PerEmaFeb> perEmaFebs) {
		this.perEmaFebs = perEmaFebs;
	}

	public PerEmaFeb addPerEmaFeb(PerEmaFeb perEmaFeb) {
		getPerEmaFebs().add(perEmaFeb);
		perEmaFeb.setPerIntention(this);

		return perEmaFeb;
	}

	public PerEmaFeb removePerEmaFeb(PerEmaFeb perEmaFeb) {
		getPerEmaFebs().remove(perEmaFeb);
		perEmaFeb.setPerIntention(null);

		return perEmaFeb;
	}

	public PerPmsDept getPerPmsDept() {
		return this.perPmsDept;
	}

	public void setPerPmsDept(PerPmsDept perPmsDept) {
		this.perPmsDept = perPmsDept;
	}

	public PerPmsEmp getPerPmsEmp() {
		return this.perPmsEmp;
	}

	public void setPerPmsEmp(PerPmsEmp perPmsEmp) {
		this.perPmsEmp = perPmsEmp;
	}

	public PerPmsPot getPerPmsPot() {
		return this.perPmsPot;
	}

	public void setPerPmsPot(PerPmsPot perPmsPot) {
		this.perPmsPot = perPmsPot;
	}

	public PerRetDem getPerRetDem() {
		return this.perRetDem;
	}

	public void setPerRetDem(PerRetDem perRetDem) {
		this.perRetDem = perRetDem;
	}

	public PerRetRse getPerRetRse() {
		return this.perRetRse;
	}

	public void setPerRetRse(PerRetRse perRetRse) {
		this.perRetRse = perRetRse;
	}

	public PerTngXes getPerTngXe() {
		return this.perTngXe;
	}

	public void setPerTngXe(PerTngXes perTngXe) {
		this.perTngXe = perTngXe;
	}

}